const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
	transpileDependencies: true,
	devServer: {
		host: "0.0.0.0",
		port: "8086",
		open: false,
		proxy: {
			"/controller": {
				// target: "http://192.164.1.90:8002",
				target: "http://192.166.0.80:8002",
				changeOrigin: true, // 跨域
				secure: false, // https
				pathRewrite: {
					"/controller": "",
				},
			},
		},
	},
	configureWebpack: (config) => {
		// 为生产环境修改配置...
		if (process.env.NODE_ENV === "production") {
			config.mode = "production";
			// 打包文件大小配置
			config.performance = {
				maxEntrypointSize: 10000000,
				maxAssetSize: 30000000,
			};
		}
	},
});
